const path = require('path');
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
    // entry: "./src/index.js",
    entry: {
        index: './src/index.js',
        print:"./src/print.js"
    },
    output: {
        // filename: "bundle.js",
        // [name]对应entry的键名
        filename:"[name].bundle.js",
        path: path.resolve(__dirname, "build"),
        clean:true
    },
    // plugin
    plugins: [
        new HtmlWebpackPlugin({
            title: "manager output",
            template:"./src/index.html"
        })
    ]
}